/**
 * Created with IntelliJ IDEA.
 * User: twer
 * Date: 5/28/13
 * Time: 11:29 AM
 * To change this template use File | Settings | File Templates.
 */
public class Fibonacci {
    public int get(int index) {
        int ret = -1;
        if (index == 1) {
            ret = 0;
        } else if (index == 2) {
            ret = 1;
        } else if (index > 2) {
            ret = get(index - 2) + get(index - 1);
        }

        return ret;
    }
}
